package com.personalblog.mapper;

import com.personalblog.po.User;
import com.personalblog.vo.UserPermissionVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author jxau_scf
 * @date 2021/2/22 - 18:50
 */
@Repository
public interface UserMapper {

    /**
     * 查询所有用户
     * @return
     */
    List<User> queryAll();

    /**
     * 根据用户名和密码查询用户
     * @param username
     * @param password
     * @return
     */
    User findUserByUsernameAndPassword(@Param("userName") String username, @Param("password") String password);

    User findUserByUserName(String userName);

    List<UserPermissionVo> queryUserPermission(int userId);
}
